package gateway.internal.config.yaml;

import gateway.internal.config.impl.DefaultConnectorConfig;
import gateway.internal.config.impl.DefaultFilterConfig;
import gateway.internal.config.impl.DefaultInboundConfig;
import gateway.internal.config.impl.DefaultOutboundConfig;

import java.util.List;

/**
 * @author Jin Zheng
 * @since 1.0 2020-09-15
 */
public class YamlGatewayConfig
{
	private List<YamlRouteConfig> routes;
	private List<DefaultConnectorConfig> connectors;
	private List<DefaultInboundConfig> inbounds;
	private List<DefaultFilterConfig> filters;
	private List<DefaultOutboundConfig> outbounds;
	private List<String> imports;

	public YamlGatewayConfig()
	{
	}

	public List<YamlRouteConfig> getRoutes()
	{
		return routes == null ? List.of() : routes;
	}

	public void setRoutes(List<YamlRouteConfig> routes)
	{
		this.routes = routes;
	}

	public List<DefaultConnectorConfig> getConnectors()
	{
		return connectors == null ? List.of() : connectors;
	}

	public void setConnectors(List<DefaultConnectorConfig> connectors)
	{
		this.connectors = connectors;
	}

	public List<DefaultInboundConfig> getInbounds()
	{
		return inbounds == null ? List.of() : inbounds;
	}

	public void setInbounds(List<DefaultInboundConfig> inbounds)
	{
		this.inbounds = inbounds;
	}

	public List<DefaultFilterConfig> getFilters()
	{
		return filters == null ? List.of() : filters;
	}

	public void setFilters(List<DefaultFilterConfig> filters)
	{
		this.filters = filters;
	}

	public List<DefaultOutboundConfig> getOutbounds()
	{
		return outbounds == null ? List.of() : outbounds;
	}

	public void setOutbounds(List<DefaultOutboundConfig> outbounds)
	{
		this.outbounds = outbounds;
	}

	public List<String> getImports()
	{
		return imports == null ? List.of() : imports;
	}

	public void setImports(List<String> imports)
	{
		this.imports = imports;
	}
}
